export const types = {
	SET_BIZFLOW_ID: 'uploadVideo/SET_BIZFLOW_ID',
	SET_VIDEO_PAGES: 'uploadVideo/SET_VIDEO_PAGES',
	SET_SPEAK_VIDEO_DATA: 'uploadVideo/SET_SPEAK_VIDEO_DATA',
	SET_SILENT_VIDEO_DATA: 'uploadVideo/SET_SILENT_VIDEO_DATA'
};

export default {
	namespaced: true,
	state: {
		bizflowId: '',
		pages: {
			total: 0,
			page: 1,
			pageSize: 10
		},
		speakVideoData: [],
		silentVideoData: []
	},

	mutations: {
		[types.SET_BIZFLOW_ID](state, bizflowId) {
			state.bizflowId = bizflowId;
		},
		[types.SET_VIDEO_PAGES](state, pages) {
			state.pages = pages;
		},
		[types.SET_SPEAK_VIDEO_DATA](state, speakVideoData) {
			state.speakVideoData = speakVideoData;
		},
		[types.SET_SILENT_VIDEO_DATA](state, silentVideoData) {
			state.silentVideoData = silentVideoData;
		}
	},

	actions: {
		setVideoBizflowId({ commit }, bizflowId) {
			commit(types.SET_BIZFLOW_ID, bizflowId);
		},
		setVideoPages({ commit }, pages) {
			commit(types.SET_VIDEO_PAGES, pages);
		},
		setSilentVideoData({ commit }, silentVideoData) {
			commit(types.SET_SILENT_VIDEO_DATA, silentVideoData);
		},
		setSpeakVideoData({ commit }, speakVideoData) {
			commit(types.SET_SPEAK_VIDEO_DATA, speakVideoData);
		}
	}
};
